/*
 * @Author: 黄宏智(HarryWong)
 * @Date: 2022-08-12 11:33:46
 * @LastEditors: 黄宏智(HarryWong)
 * @LastEditTime: 2023-07-11 19:16:05
 * @FilePath: /official-website/src/components/tools/iconfontIcon.tsx
 * @Description:
 */
import { createFromIconfontCN } from '@ant-design/icons-vue'
import { defineComponent } from 'vue'

const IconFont = createFromIconfontCN({
  scriptUrl: [
    '//at.alicdn.com/t/c/font_3584494_icsn9etbq9.js',
    '//at.alicdn.com/t/c/font_4162393_66ypsbx456b.js'
  ]
})
export default defineComponent({
  name: 'IconFont',
  props: ['icon', 'extraCommonProps'],
  components: { IconFont },
  setup(props) {
    return () => (
      <IconFont
        type={props.icon}
        style={{ fontSize: '20px' }}
        class={`iconfontIcon`}
        {...props.extraCommonProps}
      />
    )
  }
})
